<?php

use think\facade\Route;


Route::rest([
    'index'   => ['GET', '', 'list'],
    'read' => ['GET', '/:id', 'detail'],
    'save' => ['POST', '', 'add'],
    'update' => ['PUT', '/:id', 'edit'],
    'delete' => ['DELETE', '/:id', 'delete'],
]);


// 用户管理
Route::group('admin', function () {


    Route::group(function () {
        Route::resource('shop', 'admin.shop');
        Route::resource('shop1', 'admin.shop1');
        // 获取二维码
        Route::get('store/qrCode', 'admin.Store/qrCode');
        Route::get('store/hot_area', 'admin.Store/hot_area');
        Route::resource('store', 'admin.store');

        // 门店申请
        Route::resource('apply', 'admin.apply');
        Route::post('apply/audit/:id', 'admin.apply/audit');

        // 分类选择
        Route::get('category/select', 'admin.Category/select');

        Route::resource('category', 'admin.category');

        Route::resource('brand', 'admin.brand');

        //品牌审核页
        Route::resource('brandAudit', 'admin.brandAudit');
        Route::post('brandAudit/audit/:id', 'admin.brandAudit/audit');

        //行业审核页
        Route::resource('categoryAudit', 'admin.categoryAudit');
        Route::post('categoryAudit/audit/:id', 'admin.categoryAudit/audit');

        // 充值余额/积分
        Route::post('Shop/recharge', 'admin.Shop/recharge');


        //供应商审核
        Route::resource('supplierApply', 'admin.supplierApply');


    })->middleware('check_rule', 'admin');

    
});
